C4Container
title Containers of the Order Platform
Person(user, "Shopper", "Places orders")
Person(ops, "Operator", "Runs the platform")
System_Boundary(sys, "Order Platform") {
Container(spa, "Web App", "React", "Storefront UI")
Container(mobile, "Mobile App", "Swift, Kotlin", "Native clients")
Container(gw, "API Gateway", "Envoy", "Routing, auth, limits")
Container(orders, "Orders Service", "Go", "Order lifecycle")
Container(pay, "Payments Service", "Java", "Payment orchestration")
Container(inv, "Inventory Service", "Rust", "Stock reservations")
Container(notif, "Notification Worker", "Python", "Email and push")
ContainerQueue(bus, "Event Bus", "Kafka", "Domain events")
ContainerDb(odb, "Orders DB", "PostgreSQL", "Orders")
ContainerDb(pdb, "Payments DB", "PostgreSQL", "Payments")
ContainerDb(cache, "Cache", "Redis", "Sessions and carts")
ContainerDb(search, "Search Index", "OpenSearch", "Catalog search")
}
System_Ext(psp, "Payment Provider", "Cards")
System_Ext(mail, "Email Service", "Mail")
System_Ext(idp, "Identity Provider", "OIDC")
Rel(user, spa, "Uses", "HTTPS")
Rel(user, mobile, "Uses")
Rel(spa, gw, "Calls", "JSON/HTTPS")
Rel(mobile, gw, "Calls", "JSON/HTTPS")
Rel(gw, idp, "Validates tokens", "OIDC")
Rel(gw, orders, "Routes", "gRPC")
Rel(gw, search, "Queries")
Rel(orders, inv, "Reserves", "gRPC")
Rel(orders, pay, "Requests payment", "gRPC")
Rel(orders, odb, "Reads/writes", "SQL")
Rel(pay, pdb, "Reads/writes", "SQL")
Rel(pay, psp, "Charges", "HTTPS")
Rel(orders, bus, "Publishes")
Rel(bus, notif, "Delivers")
Rel(notif, mail, "Sends", "SMTP")
Rel(gw, cache, "Caches")
Rel(ops, gw, "Administers")